<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #div0{
            display: flex;
            width: 400px;
            height: 500px;
            background-color: violet;
        }
        #div0 div{
            /*width: 200px;*/
            height: 200px;
            background-color: yellow;
            /*设置基本宽度,一旦设置 width将失效*/
            /*flex-basis: 50px;*/
            /*flex-basis: 30%;*/
        }
        /*
        flex-grow 是否允许扩充
        400-50-100=250px
        250/5=50
        (1)50+50 = 100
        (2)100+50*4 = 300
        */
        #div0 div:nth-child(1){
            flex-basis: 50px;
            flex-grow: 1;
        }
        #div0 div:nth-child(2){
            flex-basis: 100px;
            flex-grow: 4;
        }
    </style>
</head>
<body>
    <div id="div0">
        <div></div>
        <div></div>

    </div>
</body>
</html>
